RFC: stopPropagation vs. preventDefault for escape#33750
Draft
smhigley wants to merge 2 commits intomicrosoft:masterfrom
Draft
RFC: stopPropagation vs. preventDefault for escape#33750smhigley wants to merge 2 commits intomicrosoft:masterfrom
smhigley wants to merge 2 commits intomicrosoft:masterfrom
Conversation
📊 Bundle size report✅ No changes found |
|
Pull request demo site: URL |
bsunderhus
reviewed
Feb 11, 2025
| - Interop with v8, v0, the HTML `<dialog>` element, and other non-Fluent controls | ||
| - No way to opt out of stopping propagation for escape | ||
|
|
||
| ## Open Issues |
Contributor
There was a problem hiding this comment.
nit:
Also good to mention: when we used to have stopPropagation prior to #29262, every once in a while we would have to pair with some lost engineer on TMP side that didn't know why the click handler doesn't work when a dialog/popover is closed.
bsunderhus
reviewed
Feb 11, 2025
| - Follows the most common established pattern | ||
| - Interop with v8, v0, the HTML `<dialog>` element, and other non-Fluent controls | ||
| - No way to opt out of stopping propagation for escape | ||
|
|
Contributor
There was a problem hiding this comment.
Suggested change
| - Higher level actors on the page might lose information as we're stopping the emission of an event. There were cases where this was affecting telemetry tools for example. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added an RFC for the
stopPropagationvs.preventDefaultquestion for the escape key, kicked off by a question from OWA.The goal is also to get documentation into our storybook if we keep the
preventDefaultapproach, both to have something we can refer to, and to give teams a heads up that they need to handle it themselves.(cc/ @bsunderhus)